package com.webtest.intercepter;

import com.webtest.controller.admin.AdminBookBorrowController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
public class NightlyJob {

    @Autowired
    private AdminBookBorrowController adminBookBorrowController;

    @Scheduled(cron = "0 0 0 * * ?") // 每晚12点执行
    public void runEveryNight() {
        // 这里是你的任务逻辑
        adminBookBorrowController.total(null,null);
    }
}